<?php
class dailyEntity
{
	/*获取今天的日报*/
	public static function GetTodayDaily($current_day,$uid)
	{
        return $_ENV['db']->fetch("SELECT * FROM daily WHERE uid = '{$uid}' AND dateline = '{$current_day}'");
	}

	/*初始化项数据*/
	public static function InitItemDetail()
	{
		$detail = array(
					'project_phase' => '项目阶段',
					'work_result' => '工作结果',
					'result_mark' => '结果说明',
					'other_mark' => '对应费用明细',
					'other_subtotal' => '其他小计',
                    'work_mark' => '工作说明',
                    'work_object' => '工作对象',
					'mark' => '备注',);
        foreach (explode("\n",$_ENV['config']['daily_item']) as $v) 
		{ //遍历自定义项目加入$detail
        	list($dk,$dv)            = explode("-",$v);
            $detail[$dk.'_mark']     = $dv.'明细';
            $detail[$dk.'_subtotal'] = $dv.'小计';
        }
		return $detail;
	}

	
	
}
?>